﻿using System;
using System.Collections.Generic;
using System.Text;
using FunctionalCLR;
using FunctionalCLR.Core;

namespace FunctionalCLR.Shell.Function.IO {

    /// <summary>
    /// echo("wow");
    /// </summary>
    public class EchoNode : FuncNode {

        public EchoNode()
            : base() {
            base.Value = "echo";
        }

        public override FuncNode GetReversedFunction(int index) {
            throw new NotImplementedException();
        }

        public override object Evaluate() {
            string message = Children[0].Evaluate().ToString();

            System.Console.WriteLine(message);

            return string.Empty;
        }
    }
}
